<ng-template #defaultTemplate let-spinner="">
  <div class="spinner">
    <div class="bounce bounce1"></div>
    <div class="bounce bounce2"></div>
    <div class="bounce bounce3"></div>
  </div>
 </ng-template>

<ng-template [ngTemplateOutlet]="spinnerTemplate || defaultTemplate" [ngTemplateOutletContext]="{ $implicit: this }"> </ng-template>
